/*
 * XML Type:  RecurringPaymentRequest
 * Namespace: http://ofx.net/types/2003/04
 * Java type: net.ofx.types.x2003.x04.RecurringPaymentRequest
 *
 * Automatically generated - do not modify.
 */
package net.ofx.types.x2003.x04.impl;
/**
 * An XML RecurringPaymentRequest(@http://ofx.net/types/2003/04).
 *
 * This is a complex type.
 */
public class RecurringPaymentRequestImpl extends net.ofx.types.x2003.x04.impl.AbstractRecurringPaymentRequestImpl implements net.ofx.types.x2003.x04.RecurringPaymentRequest
{
    
    public RecurringPaymentRequestImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName RECURRINST$0 = 
        new javax.xml.namespace.QName("", "RECURRINST");
    private static final javax.xml.namespace.QName PMTINFO$2 = 
        new javax.xml.namespace.QName("", "PMTINFO");
    private static final javax.xml.namespace.QName INITIALAMT$4 = 
        new javax.xml.namespace.QName("", "INITIALAMT");
    private static final javax.xml.namespace.QName FINALAMT$6 = 
        new javax.xml.namespace.QName("", "FINALAMT");
    
    
    /**
     * Gets the "RECURRINST" element
     */
    public net.ofx.types.x2003.x04.RecurringInstructions getRECURRINST()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.RecurringInstructions target = null;
            target = (net.ofx.types.x2003.x04.RecurringInstructions)get_store().find_element_user(RECURRINST$0, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "RECURRINST" element
     */
    public void setRECURRINST(net.ofx.types.x2003.x04.RecurringInstructions recurrinst)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.RecurringInstructions target = null;
            target = (net.ofx.types.x2003.x04.RecurringInstructions)get_store().find_element_user(RECURRINST$0, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.RecurringInstructions)get_store().add_element_user(RECURRINST$0);
            }
            target.set(recurrinst);
        }
    }
    
    /**
     * Appends and returns a new empty "RECURRINST" element
     */
    public net.ofx.types.x2003.x04.RecurringInstructions addNewRECURRINST()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.RecurringInstructions target = null;
            target = (net.ofx.types.x2003.x04.RecurringInstructions)get_store().add_element_user(RECURRINST$0);
            return target;
        }
    }
    
    /**
     * Gets the "PMTINFO" element
     */
    public net.ofx.types.x2003.x04.PaymentInfo getPMTINFO()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PaymentInfo target = null;
            target = (net.ofx.types.x2003.x04.PaymentInfo)get_store().find_element_user(PMTINFO$2, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * Sets the "PMTINFO" element
     */
    public void setPMTINFO(net.ofx.types.x2003.x04.PaymentInfo pmtinfo)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PaymentInfo target = null;
            target = (net.ofx.types.x2003.x04.PaymentInfo)get_store().find_element_user(PMTINFO$2, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.PaymentInfo)get_store().add_element_user(PMTINFO$2);
            }
            target.set(pmtinfo);
        }
    }
    
    /**
     * Appends and returns a new empty "PMTINFO" element
     */
    public net.ofx.types.x2003.x04.PaymentInfo addNewPMTINFO()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.PaymentInfo target = null;
            target = (net.ofx.types.x2003.x04.PaymentInfo)get_store().add_element_user(PMTINFO$2);
            return target;
        }
    }
    
    /**
     * Gets the "INITIALAMT" element
     */
    public java.lang.String getINITIALAMT()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(INITIALAMT$4, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "INITIALAMT" element
     */
    public net.ofx.types.x2003.x04.AmountType xgetINITIALAMT()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.AmountType target = null;
            target = (net.ofx.types.x2003.x04.AmountType)get_store().find_element_user(INITIALAMT$4, 0);
            return target;
        }
    }
    
    /**
     * True if has "INITIALAMT" element
     */
    public boolean isSetINITIALAMT()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(INITIALAMT$4) != 0;
        }
    }
    
    /**
     * Sets the "INITIALAMT" element
     */
    public void setINITIALAMT(java.lang.String initialamt)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(INITIALAMT$4, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(INITIALAMT$4);
            }
            target.setStringValue(initialamt);
        }
    }
    
    /**
     * Sets (as xml) the "INITIALAMT" element
     */
    public void xsetINITIALAMT(net.ofx.types.x2003.x04.AmountType initialamt)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.AmountType target = null;
            target = (net.ofx.types.x2003.x04.AmountType)get_store().find_element_user(INITIALAMT$4, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.AmountType)get_store().add_element_user(INITIALAMT$4);
            }
            target.set(initialamt);
        }
    }
    
    /**
     * Unsets the "INITIALAMT" element
     */
    public void unsetINITIALAMT()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(INITIALAMT$4, 0);
        }
    }
    
    /**
     * Gets the "FINALAMT" element
     */
    public java.lang.String getFINALAMT()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FINALAMT$6, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "FINALAMT" element
     */
    public net.ofx.types.x2003.x04.AmountType xgetFINALAMT()
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.AmountType target = null;
            target = (net.ofx.types.x2003.x04.AmountType)get_store().find_element_user(FINALAMT$6, 0);
            return target;
        }
    }
    
    /**
     * True if has "FINALAMT" element
     */
    public boolean isSetFINALAMT()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(FINALAMT$6) != 0;
        }
    }
    
    /**
     * Sets the "FINALAMT" element
     */
    public void setFINALAMT(java.lang.String finalamt)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FINALAMT$6, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(FINALAMT$6);
            }
            target.setStringValue(finalamt);
        }
    }
    
    /**
     * Sets (as xml) the "FINALAMT" element
     */
    public void xsetFINALAMT(net.ofx.types.x2003.x04.AmountType finalamt)
    {
        synchronized (monitor())
        {
            check_orphaned();
            net.ofx.types.x2003.x04.AmountType target = null;
            target = (net.ofx.types.x2003.x04.AmountType)get_store().find_element_user(FINALAMT$6, 0);
            if (target == null)
            {
                target = (net.ofx.types.x2003.x04.AmountType)get_store().add_element_user(FINALAMT$6);
            }
            target.set(finalamt);
        }
    }
    
    /**
     * Unsets the "FINALAMT" element
     */
    public void unsetFINALAMT()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(FINALAMT$6, 0);
        }
    }
}
